package com.lee.dhsg.dao;

import com.lee.dhsg.domain.Lunbo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Lee
 */

@Component
@Mapper
public interface LunboDao {

    /**
     * 查询所有
     *
     * @return
     */
    @Select("select * from lunbo")
    List<Lunbo> findAll();

    /**
     * 通过 lid 查询 lunbo 表，并将查到的数据当做 Lunbo 对象传回
     */
    @Select("select * from lunbo where lid = #{lid}")
    Lunbo selectByOid(@Param("lid") Integer lid);

}
